home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / helplib / help_option_proc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-18  |  858 b   |  33 lines

  1. /*
  2. ### procedure for selecting a helping option ###
  3.  
  4. */
  5.  
  6. #include <suntool/sunview.h>
  7. #include <suntool/textsw.h>
  8. #include <suntool/panel.h>
  9.  
  10. void 
  11. help_option_proc(item,value,event)
  12. Panel_item      item;
  13. int             value;
  14. Event          *event;
  15. {
  16.     extern Textsw help_textsw;
  17.     extern Textsw_status help_status;
  18.         extern int help_option;
  19.     extern char string[],help_dir[];
  20.  
  21.         help_option = value;
  22.         sprintf(string,"%s/online_help.%d",help_dir,help_option);
  23.         window_set(help_textsw,
  24.                 TEXTSW_STATUS, &help_status,
  25.                 TEXTSW_FILE,string,
  26.                 TEXTSW_FIRST,0,
  27.                 0);
  28.         if(help_status == TEXTSW_STATUS_CANNOT_OPEN_INPUT){
  29.                 sprintf(string,"Help file (%s/%d) does not exist!\n",help_dir,help_option);
  30.                 system_mess_proc(1,string);
  31.         }       
  32. }
  33.